{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Aligment"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import com.twosigma.beakerx.scala.table._\n",
    "import com.twosigma.beakerx.scala.fileloader.CSV\n",
    "import com.twosigma.beakerx.table.format.TableDisplayStringFormat\n",
    "import java.util.concurrent.TimeUnit\n",
    "\n",
    "// 1 setAlignmentProviderForColumn defaults\n",
    "val colNames = Seq(\"string column\", \"integer column\", \"double column\",\"time column\", \"boolean column\")\n",
    "val table1 = new TableDisplay(Seq(Seq(\"0\", 0, 0, 0, 0), \n",
    "                                 Seq(\"June\", 22, 33, 1391000000, true), \n",
    "                                 Seq(\"July\", 200, 300, 1491000000, false),\n",
    "                                 Seq(\"August\", 222, 333, 1591000000, true)),\n",
    "                                 colNames,\n",
    "                                 Seq(\"string\", \"integer\", \"double\", \"time\", \"boolean\"))\n",
    "table1.setStringFormatForTimes(TimeUnit.DAYS)\n",
    "table1              "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// expected result of cell 1\n",
    "Image(\"../../resources/img/scala/tableAPI/cell1_case1.png\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// 1_2 setAlignmentProviderForColumn\n",
    "val colNames = Seq(\"string column\", \"integer column\", \"double column\",\"time column\", \"boolean column\")\n",
    "val table1_2 = new TableDisplay(Seq(Seq(\"0\", 0, 0, 0, 0), \n",
    "                                 Seq(\"June\", 22, 33, 1391000000, true), \n",
    "                                 Seq(\"July\", 200, 300, 1491000000, false),\n",
    "                                 Seq(\"August\", 222, 333, 1591000000, true)),\n",
    "                                 colNames,\n",
    "                                 Seq(\"string\", \"integer\", \"double\", \"time\", \"boolean\"))\n",
    "table1_2.setStringFormatForTimes(TimeUnit.DAYS)\n",
    "table1_2.setAlignmentProviderForColumn(colNames(0), TableDisplayAlignmentProvider.CENTER_ALIGNMENT)\n",
    "table1_2.setAlignmentProviderForColumn(colNames(1), TableDisplayAlignmentProvider.CENTER_ALIGNMENT)\n",
    "table1_2.setAlignmentProviderForColumn(colNames(2), TableDisplayAlignmentProvider.CENTER_ALIGNMENT)\n",
    "table1_2.setAlignmentProviderForColumn(colNames(3), TableDisplayAlignmentProvider.LEFT_ALIGNMENT)\n",
    "table1_2.setAlignmentProviderForColumn(colNames(4), TableDisplayAlignmentProvider.RIGHT_ALIGNMENT)\n",
    "table1_2   "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// expected result of cell 1_2\n",
    "Image(\"../../resources/img/scala/tableAPI/cell1_case1.png\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// 2 setAlignmentProviderForType\n",
    "val colNames = Seq(\"string column\", \"integer column\", \"double column\",\"time column\", \"boolean column\")\n",
    "val table2 = new TableDisplay(Seq(Seq(\"0\", 0, 0, 0, 0), \n",
    "                                 Seq(\"June\", 22, 33, 1391000000, true), \n",
    "                                 Seq(\"July\", 200, 300, 1491000000, false),\n",
    "                                 Seq(\"August\", 222, 333, 1591000000, true)),\n",
    "                                 colNames,\n",
    "                                 Seq(\"string\", \"integer\", \"double\", \"time\", \"boolean\"))\n",
    "table2.setStringFormatForTimes(TimeUnit.DAYS)\n",
    "table2.setAlignmentProviderForType(ColumnType.String, TableDisplayAlignmentProvider.CENTER_ALIGNMENT)\n",
    "table2.setAlignmentProviderForType(ColumnType.Integer, TableDisplayAlignmentProvider.CENTER_ALIGNMENT)\n",
    "table2.setAlignmentProviderForType(ColumnType.Double, TableDisplayAlignmentProvider.CENTER_ALIGNMENT)\n",
    "table2.setAlignmentProviderForType(ColumnType.Time, TableDisplayAlignmentProvider.LEFT_ALIGNMENT)\n",
    "table2.setAlignmentProviderForType(ColumnType.Boolean, TableDisplayAlignmentProvider.RIGHT_ALIGNMENT)\n",
    "table2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// expected result of cell 2\n",
    "Image(\"../../resources/img/scala/tableAPI/cell2_case1.png\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Bar Charts Renderer"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// 3\n",
    "val table3 = new TableDisplay(new CSV().readFile(\"../../resources/data/interest-rates-small.csv\"))\n",
    "table3.setRendererForType(ColumnType.Double, TableDisplayCellRenderer.getDataBarsRenderer(true))\n",
    "// use the false parameter to hide value\n",
    "table3.setRendererForColumn(\"y10\", TableDisplayCellRenderer.getDataBarsRenderer(false))\n",
    "table3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// expected result of cell 3\n",
    "Image(\"../../resources/img/scala/tableAPI/cell3_case1.png\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Formatting"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// 4\n",
    "val table4 = new TableDisplay(new CSV().readFile(\"../../resources/data/interest-rates-small.csv\"))\n",
    "table4.setStringFormatForTimes(TimeUnit.DAYS)\n",
    "table4.setStringFormatForType(ColumnType.Double, TableDisplayStringFormat.getDecimalFormat(2,3))\n",
    "table4.setStringFormatForColumn(\"m3\", TableDisplayStringFormat.getDecimalFormat(0, 0))\n",
    "table4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// expected result of cell 4\n",
    "Image(\"../../resources/img/scala/tableAPI/cell4_case1.png\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# HTML format"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// 5\n",
    "val map5 = Map(\"x\" -> \"<em style=\\\"color:red\\\">italic red</em>\", \"y\" -> \"<b style=\\\"color:blue\\\">bold blue</b>\", \"z\" -> \"multiline strings<br/>work fine too\")\n",
    "val table5 = new TableDisplay(map5)\n",
    "table5.setStringFormatForColumn(\"Value\", TableDisplayStringFormat.getHTMLFormat())\n",
    "table5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// expected result of cell 5\n",
    "Image(\"../../resources/img/scala/tableAPI/cell5_case1.png\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Column Visibility and Placement"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// 6\n",
    "val table6 = new TableDisplay(new CSV().readFile(\"../../resources/data/interest-rates-small.csv\"))\n",
    "//freeze a column\n",
    "table6.setColumnFrozen(\"y1\", true)\n",
    "//hide a column\n",
    "table6.setColumnVisible(\"y30\", false)\n",
    "table6"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// expected result of cell 6\n",
    "Image(\"../../resources/img/scala/tableAPI/cell6_case1.png\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// 7\n",
    "val table7 = new TableDisplay(new CSV().readFile(\"../../resources/data/interest-rates-small.csv\"))\n",
    "// Columns in the list will be shown in the provided order. Columns not in the list will be hidden.\n",
    "table7.setColumnOrder(Seq(\"m3\", \"y1\", \"y10\", \"time\", \"y2\"))\n",
    "table7"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// expected result of cell 7\n",
    "Image(\"../../resources/img/scala/tableAPI/cell7_case1.png\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# HeatmapHighlighter"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// 8 highlighter for row\n",
    "val table8 = new TableDisplay(new CSV().readFile(\"../../resources/data/interest-rates-small.csv\"))\n",
    "table8.addCellHighlighter(TableDisplayCellHighlighter.getHeatmapHighlighter(\"m3\", TableDisplayCellHighlighter.FULL_ROW))\n",
    "table8"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// expected result of cell 8\n",
    "Image(\"../../resources/img/scala/tableAPI/cell8_case1.png\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// 9 highlighter for column\n",
    "val table9 = new TableDisplay(new CSV().readFile(\"../../resources/data/interest-rates-small.csv\"))\n",
    "table9.addCellHighlighter(TableDisplayCellHighlighter.getHeatmapHighlighter(\"m6\", TableDisplayCellHighlighter.SINGLE_COLUMN, 6, 8, Color.BLACK, Color.PINK))\n",
    "table9.addCellHighlighter(new ThreeColorHeatmapHighlighter(\"y1\", TableDisplayCellHighlighter.SINGLE_COLUMN, 4, 6, 8, new Color(247,106,106), new Color(239,218,82), new Color(100,189,122)))\n",
    "table9"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// expected result of cell 9\n",
    "Image(\"../../resources/img/scala/tableAPI/cell9_case1.png\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// 9_2\n",
    "table9.removeAllCellHighlighters()\n",
    "table9"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// expected result of cell 9_2\n",
    "Image(\"../../resources/img/scala/tableAPI/cell9_case2.png\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// 9_3 set HeatmapHighlighter for type\n",
    "val colNames = Seq(\"xxx column\", \"integer column\", \"double column\", \"number column\")\n",
    "val row1 = Seq(6, 6, 0.5, 6)\n",
    "val row2 = Seq(3, 3, 2.0, 3)\n",
    "val row3 = Seq(2, 2, 3.0, 2)\n",
    "val row4 = Seq(0, 0, 6.0, 0)\n",
    "val table93 = new TableDisplay(Seq(row1, row2, row3, row4), colNames, Seq(\"xxx type\", \"integer\", \"double\", \"number\"))\n",
    "table93.addCellHighlighter(TableDisplayCellHighlighter.getHeatmapHighlighter(colNames(0), TableDisplayCellHighlighter.SINGLE_COLUMN))\n",
    "table93.addCellHighlighter(TableDisplayCellHighlighter.getHeatmapHighlighter(colNames(1), TableDisplayCellHighlighter.SINGLE_COLUMN))\n",
    "table93.addCellHighlighter(TableDisplayCellHighlighter.getHeatmapHighlighter(colNames(2), TableDisplayCellHighlighter.SINGLE_COLUMN))\n",
    "table93.addCellHighlighter(TableDisplayCellHighlighter.getHeatmapHighlighter(colNames(3), TableDisplayCellHighlighter.SINGLE_COLUMN))\n",
    "table93"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// expected result of cell 9_3\n",
    "Image(\"../../resources/img/scala/tableAPI/cell9_case3.png\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# UniqueEntriesHighlighter"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// 10\n",
    "val table10 = new TableDisplay(new CSV().readFile(\"../../resources/data/interest-rates-small.csv\"))\n",
    "table10.addCellHighlighter(TableDisplayCellHighlighter.getUniqueEntriesHighlighter(\"m3\"))\n",
    "table10"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// expected result of cell 10\n",
    "Image(\"../../resources/img/scala/tableAPI/cell10_case1.png\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// 11\n",
    "val table11 = new TableDisplay(new CSV().readFile(\"../../resources/data/interest-rates-small.csv\"))\n",
    "table11.addCellHighlighter(TableDisplayCellHighlighter.getUniqueEntriesHighlighter(\"y1\", TableDisplayCellHighlighter.SINGLE_COLUMN))\n",
    "table11.addCellHighlighter(TableDisplayCellHighlighter.getUniqueEntriesHighlighter(\"y3\", TableDisplayCellHighlighter.SINGLE_COLUMN))\n",
    "table11"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// expected result of cell 11\n",
    "Image(\"../../resources/img/scala/tableAPI/cell11_case1.png\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# FontSize"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// 12\n",
    "val table12 = new TableDisplay(new CSV().readFile(\"../../resources/data/interest-rates-small.csv\"))\n",
    "table12.setDataFontSize(10)\n",
    "table12.setHeaderFontSize(16)\n",
    "table12"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// expected result of cell 12\n",
    "Image(\"../../resources/img/scala/tableAPI/cell12_case1.png\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// 13\n",
    "val table13 = new TableDisplay(new CSV().readFile(\"../../resources/data/interest-rates-small.csv\"))\n",
    "table13.setHeadersVertical(true)\n",
    "table13"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// expected result of cell 13\n",
    "Image(\"../../resources/img/scala/tableAPI/cell13_case1.png\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# ColorProvider"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// 14\n",
    "val mapList14 = List(\n",
    " Map(\"firstCol\" -> 1, \"secondCol\" -> 2, \"thirdCol\" -> 3),\n",
    " Map(\"firstCol\" -> 4, \"secondCol\" -> 5, \"thirdCol\" -> 6),\n",
    " Map(\"firstCol\" -> 9, \"secondCol\" -> 8, \"thirdCol\" -> 9)\n",
    ")\n",
    "val table14 = new TableDisplay(mapList14)\n",
    "\n",
    "val colors = Seq(\n",
    "            Seq(Color.LIGHT_GRAY, Color.GRAY, Color.RED),\n",
    "            Seq(Color.YELLOW, Color.ORANGE, Color.RED),\n",
    "            Seq(Color.MAGENTA, Color.BLUE, Color.BLACK))\n",
    "\n",
    "table14.setFontColorProvider(new FontColorProvider {\n",
    "    override def apply(row: Integer, col: Integer, display: com.twosigma.beakerx.table.TableDisplay): Color = {\n",
    "        colors(row)(col)\n",
    "    }\n",
    "})\n",
    "\n",
    "table14"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// expected result of cell 14\n",
    "Image(\"../../resources/img/scala/tableAPI/cell14_case1.png\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# ToolTip"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// 15\n",
    "val table15 = new TableDisplay(new CSV().readFile(\"../../resources/data/interest-rates-small.csv\"))\n",
    "\n",
    "table15.setTooltip(new TooltipAction {\n",
    "    override def apply(row: Integer, col: Integer, display: com.twosigma.beakerx.table.TableDisplay): String = {\n",
    "         \"The value is: \" + display.getValues().get(row).get(col)\n",
    "    }\n",
    "})\n",
    "\n",
    "table15"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Image format"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// 16_1\n",
    "val table16_1 = new TableDisplay(Seq(\n",
    "    Map(\"Peacock\" -> \"../../resources/img/butterfly1.jpg\",\n",
    "    \"Morpho\" -> \"../../resources/img/butterfly2.jpg\",\n",
    "    \"Swallowtail\" -> \"../../resources/img/butterfly3.jpg\")\n",
    "    ));\n",
    "table16_1.setStringFormatForColumn(\"Peacock\", TableDisplayStringFormat.getImageFormat());\n",
    "table16_1.setStringFormatForColumn(\"Morpho\", TableDisplayStringFormat.getImageFormat());\n",
    "table16_1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// expected result of cell 16_1\n",
    "Image(\"../../resources/img/scala/tableAPI/cell16_case1.png\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// 16_2\n",
    "val table16_2 = new TableDisplay(Map(\n",
    "    \"up\" -> \"\",\n",
    "    \"down\" -> \"\"\n",
    "));\n",
    "table16_2.setStringFormatForColumn(\"Value\", TableDisplayStringFormat.getImageFormat())\n",
    "table16_2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// expected result of cell 16_2\n",
    "Image(\"../../resources/img/scala/tableAPI/cell16_case2.png\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Seamless Update"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// 19\n",
    "val table19 = new TableDisplay(Seq(\n",
    "    Map(\"a\" -> 1, \"b\" -> 2, \"c\" -> 3),\n",
    "    Map(\"a\" -> 4, \"b\" -> 5, \"c\" -> 6),\n",
    "    Map(\"a\" -> 7, \"b\" -> 8, \"c\" -> 9),\n",
    "));\n",
    "table19"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "table19.updateCell(2,\"c\",121)\n",
    "table19.sendModel()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// expected result of cell 19_1\n",
    "Image(\"../../resources/img/scala/tableAPI/cell19_case1.png\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// expected result of cell 19_2\n",
    "Image(\"../../resources/img/scala/tableAPI/cell19_case2.png\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## RowFilter"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "//20\n",
    "import java.{lang, util}\n",
    "\n",
    "val table20 = new TableDisplay(Seq(\n",
    "    Map(\"firstCol\" -> 1, \"secondCol\" -> 2, \"thirdCol\" -> 3),\n",
    "    Map(\"firstCol\" -> 4, \"secondCol\" -> 8, \"thirdCol\" -> 6),\n",
    "    Map(\"firstCol\" -> 7, \"secondCol\" -> 8, \"thirdCol\" -> 9)\n",
    "));\n",
    "// table20.setRowFilter { row, model ->\n",
    "//  model[row][1] == 8\n",
    "// }\n",
    "table20.setRowFilter(new RowFilter {\n",
    "override def apply(row: Integer, values: util.List[util.List[_]]): lang.Boolean = {\n",
    "        if (values.get(row).get(1).asInstanceOf[Int] == 8) true else false\n",
    "    }\n",
    "})\n",
    "table20"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// expected result of cell 20_1\n",
    "Image(\"../../resources/img/scala/tableAPI/cell20_case1.png\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## The length of types should be same as number of cols."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "val colNames = Seq(\"column 1\", \"column 2\", \"column 3\")\n",
    "val row1 = Seq(6, 6, 0.5)\n",
    "val row2 = Seq(3, 3, 2.0)\n",
    "val table94 = new TableDisplay(Seq(row1, row2), colNames, Seq(\"integer\", \"double\"))\n",
    "table94"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Rows to show"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// \n",
    "val tableRTS = new TableDisplay(new CSV().readFile(\"../../resources/data/interest-rates.csv\"))\n",
    "tableRTS.setRowsToShow(RowsToShow.SHOW_10)\n",
    "tableRTS"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Scala",
   "language": "scala",
   "name": "scala"
  },
  "language_info": {
   "codemirror_mode": "text/x-scala",
   "file_extension": ".scala",
   "mimetype": "",
   "name": "Scala",
   "nbconverter_exporter": "",
   "version": "2.12.8"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": false,
   "sideBar": false,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": false,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
